<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
 <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="<c:url value='/js/jquery-1.6.js' />"></script>
<script type="text/javascript">

function getCmy(url){
	$.getJSON(url,"{}",function(data,status){
	$.each(data,function(index,keyvalue){
		var pt=new Option(keyvalue.Epiname,keyvalue.Epid);
		var selectedElement=$("select")[0];
		if($.browser.msie)
		{
			selectedElement.add(pt);
		}
		else
		{
			selectedElement.add(pt,null);
		}
	});
	$("input[type=submit]").attr("disabled",false);
	});
}
		
$(function(){
	$("select").change(function(){
		var url=$(this).attr("url")+"?pg=1&epid="+$(this).val();
	//	$("#f").attr("action",url).submit();
		$("#show").attr("src",url);
	});
});
</script>
<title></title>
</head>
<body onload="getCmy('<c:url value='/addEp.html'/>')">
	<div style="border:1px solid #cccccc;padding-top:10px;">
		
	<form id="f" action="" target="show">
	&nbsp;&nbsp;&nbsp;&nbsp;<label>请选择公司:</label>
		<select url="<c:url value='/admin/druglist.jsp' />">
			<option value="">请选择</option>
		</select>
	</form>
	<iframe id="show" name="show" src="<c:url value='/admin/druglist.jsp?epid=&pg=1' />" scrolling="no" style="width:100%;height:640px" frameBorder="0">	
		
	</iframe>
	</div>
</body>
</html>
